package com.bank.abmock.boot;

import com.bank.abmock.config.RouteConfig;
import com.bank.abmock.mapper.RouteMapperCenter;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public abstract class LoadConfig {
    @Autowired
    RouteMapperCenter routeMapperCenter;
    //TODO 应用启动的时候自动加载这种子类下所有配置
    void loadAndRegister(){
        routeMapperCenter.register(loadConfig());
    };
    abstract List<RouteConfig> loadConfig();
}
